package com.tj.collection.controller.lending.response;

import com.fqgj.common.api.ResponseData;
import com.fqgj.common.utils.StringUtils;
import com.fqgj.log.factory.LogFactory;
import com.fqgj.log.interfaces.Log;
import com.jsoniter.JsonIterator;
import com.jsoniter.any.Any;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2019/9/10
 * Time: 下午5:57
 */
public class ClImagesResponse implements ResponseData {
    private static final Log LOGGER = LogFactory.getLog(ClImagesResponse.class);

    private List<String> list = new ArrayList<>();

    public ClImagesResponse(String json) {
        if (StringUtils.isEmpty(json)) {
            return;
        }

        List<Any> anies = JsonIterator.deserialize(json).asList();
        anies.forEach(d -> {
            list.add(d.toString());
        });
    }

    public List<String> getList() {
        return list;
    }

    public ClImagesResponse setList(List<String> list) {
        this.list = list;
        return this;
    }
}
